//
//  marketModel.swift
//  股票框架
//
//  Created by 李小骥 on 2017/10/10.
//  Copyright © 2017年 李小骥. All rights reserved.
//

import UIKit

class marketModel: NSObject {

}
struct Gupiao {
    var name = ""
    var code = ""
    var currentPrice = ""
    var zhangfu = ""
}
struct ZixuanguResult {
    var code:String
    var message:String
    //登录状态将来改成枚举
    var data:[ZixuanguData]
    init(code:String, message:String, data:[ZixuanguData]){
        //后续增加内容是否为空“”的判断
        self.code = code
        self.message = message
        self.data = data
    }
}
struct ZixuanguData {
    var name:String
    var code:String
    var nowPrice:String
    var diff_rate:String
    init(name:String, code:String, nowPrice:String, diff_rate:String) {
        self.name=name
        self.code=code
        self.nowPrice=nowPrice
        self.diff_rate=diff_rate
    }
}
struct ZixuanguMarketData {
    var yestodayClosePrice:String
    var todayMax:String
    var todayMin:String
    var max52:String
    var diff_money:String
    var tradeNum:String
    var code:String
    var maxPrice:String
    var nowPrice:String
    var min52:String
    var time:String
    var market:String
    var name:String
    var tradeAmount:String
    var swing:String
    var todayOpenPrice:String
    var diff_rate:String
    var minPrice:String
}
struct StockDetailData {
    var totalValue:String
    var code:String
    var change:String
    var volumnPrice:String
    var volumn:String
    var type:String
    var peRatio:String
    var lowPrice:String
    var price:String
    var name:String
    var turnoverRate:String
    var highPrice:String
    var closePrice:String
    var openPrice:String
    var totalShares:String
    var dateTime:String
    var changePct:String
    var swing:String
    var cityNetRate:String
    var circulationValue:String
}
enum KChartType:String{
    case day = "day"
    case month = "month"
    case week = "week"
}
struct KChartData {
    var closePrice:String
    var code:String
    var datetime:String
    var heightPrice:String
    var lowPrice:String
    var openPrice:String
    var volumn:String
    var avg5:String
    var avg10:String
    var avg20:String
    init(closePrice:String, code:String, datetime:String, heightPrice:String, lowPrice:String, openPrice:String, volumn:String, avg5:String, avg10:String, avg20:String) {
        self.closePrice=closePrice
        self.code=code
        self.datetime=datetime
        self.heightPrice=heightPrice
        self.lowPrice=lowPrice
        self.openPrice=openPrice
        self.volumn=volumn
        self.avg5=avg5
        self.avg10=avg10
        self.avg20=avg20
    }
}
struct KChartResult {
    //code 将来是枚举
    var code:String
    var message:String
    //登录状态将来改成枚举
    var data:[KChartData]
    init(code:String, message:String, data:[KChartData]){
        //后续增加内容是否为空“”的判断
        self.code = code
        self.message = message
        self.data = data
    }
}
struct TimeChartData {
    //code 将来是枚举
    var datetime:String
    var prevClosePrice:String
    var price:String
    var volumn:String
    var volumnPrice:String
    //登录状态将来改成枚举
    init(datetime:String, prevClosePrice:String, price:String, volumn:String, volumnPrice:String){
        //后续增加内容是否为空“”的判断
        self.datetime = datetime
        self.prevClosePrice = prevClosePrice
        self.price = price
        self.volumn = volumn
        self.volumnPrice = volumnPrice
    }
}

struct TimeChartResult {
    //code 将来是枚举
    var code:String
    var message:String
    //登录状态将来改成枚举
    var data:[TimeChartData]
    init(code:String, message:String, data:[TimeChartData]){
        //后续增加内容是否为空“”的判断
        self.code = code
        self.message = message
        self.data = data
    }
}
